﻿/*+===================================================================
File:      BossTwo.h

Summary:   Định nghĩa lớp CBossTwo
===================================================================+*/

#ifndef _BOSSTWO_H_
#define _BOSSTWO_H_

#include "GameObject.h"
#include "Bill.h"
#include "BossTwoBullet.h"
#include "BossTwoHand.h"
#include "BossTwoPartArm.h"

#define STATUS_MOUTH_CLOSE			0
#define STATUS_MOUTH_OPENING		1
#define STATUS_MOUTH_OPENED			2
#define STATUS_MOUTH_CLOSING		3
#define STATUS_BOSS2_NONE			4
#define STATUS_BOSS2_START			5
#define STATUS_BOSS2_APPEARING		6
#define STATUS_BOSS2_DIE			7

/*C+==================================================================
Class:    CBossTwo

Summary:  Lớp CBossTwo miêu tả boss màn 2.
==================================================================-C*/
class CBossTwo : public CMoveableObject
{
private:
	CGun* m_pGun;
	CBill* m_bill;
	CBossTwoHand* m_leftHand;
	CBossTwoHand* m_rightHand;
	int m_nStatus;
	float m_timeChange;
	float m_timeFire;
	bool m_bIsAppear;
	CExplosionGroup* m_pExplosionGroup;
	vector<D3DXVECTOR2> m_aPosEx;
	float m_fTimeDie;
public:
	CBossTwo(CBill* bill, D3DXVECTOR2 pos, int id, int typeId);
	~CBossTwo();

	void Update(float timeFrame);

	void UpdateBox(float timeFrame);

	void UpdateAnimation();

	void UpdateCollision(vector<CGameObject*> vecGameObjs, float timeFrame);

	void Draw();

	bool Kill();

	void Fire();

	void Appear()
	{
		if (m_nStatus == STATUS_BOSS2_NONE)
			m_bIsAppear = true;
	}

	void Explode(float timeFrame);

	CBossTwoPartArm* GetLeftHeadArm();
	CBossTwoPartArm* GetRightHeadArm();
};

#endif